/**
 * Copyright (c) 2013 onionframework.org
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 */
package org.onionframework.code.model;

import javax.persistence.Entity;
import javax.persistence.Table;

import org.hibernate.annotations.Parameter;
import org.hibernate.annotations.Type;
import org.hibernate.annotations.TypeDef;
import org.hibernate.annotations.TypeDefs;
import org.onionframework.code.support.HibernateCodeType;
import org.onionframework.persistence.model.AbstractModel;

/**
 * @author allan
 *
 */
@Entity
@Table(name="o_teacher")
@TypeDefs(@TypeDef(name = "code", typeClass = HibernateCodeType.class))
public class Teacher extends AbstractModel {

	private static final long serialVersionUID = -7937628026158314104L;
	
	private String name;
	private Code school;
	
	public String getName() {
		return this.name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	@Type(type="code",parameters=@Parameter(name="type",value="code.school"))
	public Code getSchool() {
		return this.school;
	}
	
	public void setSchool(Code school) {
		this.school = school;
	}
	
	
}
